from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager

from apps.user.model import *
from apps.article.model import *
from apps import Create_app
from ext import db, bootstrap

app = Create_app()
manager = Manager(app=app)
db.init_app(app)
bootstrap.init_app(app=app)
migrate = Migrate(app=app, db=db)
manager.add_command('db', MigrateCommand)

if __name__ == '__main__':
    manager.run()
